/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import Icon from 'react-native-vector-icons/Ionicons';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TabBarIOS,
} from 'react-native';

import TolietMap  from './app/toliet/index';

export default class toliet extends Component {
  constructor(props){
    super(props);
    this.state={
       selectedTab:'toliet'
    }
  }

  _renderContent(){
     return (
       <TolietMap />
     )
  }

  render() {
    return (
      <TabBarIOS>
        <Icon.TabBarItem
          iconName='ios-home-outline'
          selectedIconName='ios-home'
          selected={this.state.selectedTab === 'toliet'}
          onPress={() => {
            this.setState({
              selectedTab: 'toliet',
            });
          }}>

<TolietMap />

        </Icon.TabBarItem>
        <Icon.TabBarItem
          iconName='ios-book-outline'
          selectedIconName='ios-book'
          selected={this.state.selectedTab === 'read'}
          onPress={() => {
            this.setState({
              selectedTab: 'read',
            });
          }}>
          {
            <View><Text>ffff</Text></View>
          }
        </Icon.TabBarItem>
        <Icon.TabBarItem
          iconName='ios-rainy-outline'
          selectedIconName='ios-rainy'
          selected={this.state.selectedTab === 'weather'}
          onPress={() => {
            this.setState({
              selectedTab: 'weather',
            });
          }}>
          {
            <View><Text>ffff</Text></View>
          }
        </Icon.TabBarItem>
        <Icon.TabBarItem
          iconName='ios-cog-outline'
          selectedIconName='ios-cog'
          selected={this.state.selectedTab === 'settings'}
          onPress={() => {
            this.setState({
              selectedTab: 'settings',
            });
          }}>
          {
            <View><Text>ffff</Text></View>
          }
        </Icon.TabBarItem>
      </TabBarIOS>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

AppRegistry.registerComponent('toliet', () => toliet);
